package cn.usian.controller;

import cn.usian.pojo.Daily;
import cn.usian.service.DailyService;
import cn.usian.vo.DailyVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/daily")
public class DailyController {
    @Autowired
    DailyService dailyService;

    @RequestMapping("findAll/{pageNum}/{pageSize}")
    public Page<DailyVo> dailyPage(
            @PathVariable Integer pageNum,
            @PathVariable Integer pageSize
    ){
        return dailyService.findPage(pageNum,pageSize);
    }
}
